#include("../../comm/FormHead.html")
<div id="main">
    <form action="" class="layui-form margin-10" lay-filter="form">
        <input type="hidden" id="actions" name="actions" value="#(form.actions)">
        <input type="hidden" id="p_id" name="p_id" value="#(test.p_id)">

        #(token??)

        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">测试ID</label>

                    <div class="layui-input-block">
                        <input type="text" name="test_id" readonly placeholder="自动生成"
                               value="#(test.test_id)" class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>

                    <div class="layui-input-inline" style="width:80px">
                        <input type="text" class="layui-hide" lay-skin="myicon" value="#(test.test_icon)" name="test_icon">
                    </div>
                    <label class="layui-form-mid">数字2</label>

                    <div class="layui-input-inline" style="width:60px">
                        <input type="text" class="layui-hide" lay-skin="mynumber" autocomplete="off" value="#(test.test_number2)" step="1" name="test_number2">
                    </div>
                    <label class="layui-form-mid">数字</label>

                    <div class="layui-input-inline" style="width:60px">
                        <input type="text" class="layui-hide" lay-skin="mynumber" autocomplete="off" value="#(test.test_number)" step="1" name="test_number">
                    </div>
                    <label class="layui-form-mid">测试名称</label>

                    <div class="layui-input-inline">
                        <input type="text" name="test_name" placeholder="请输入测试名称"
                               value="#(test.test_name)" class="layui-input ">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">色值</label>

                    <div class="layui-input-inline">
                        <input type="text" class="layui-hide" lay-skin="mycolor" value="#(test.test_color2)" name="test_color2">
                    </div>
                    <label class="layui-form-mid">色值</label>

                    <div class="layui-input-inline">
                        <input type="text" class="layui-hide" lay-skin="mycolor" value="#(test.test_color)" name="test_color">
                    </div>
                    <label class="layui-form-mid">标题</label>

                    <div class="layui-input-inline">
                        <input type="text" name="test_title" placeholder="请输入标题"
                               value="#(test.test_title)" class="layui-input ">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>

                    <div class="layui-input-inline" style="width:80px">
                        <input type="text" class="layui-hide" lay-skin="myicon" value="#(test.test_icon2)" name="test_icon2">
                    </div>
                    <label class="layui-form-mid">发布时间</label>

                    <div class="layui-input-inline" style="width:160px">
                        <input type="text" id="pub_date" name="pub_date" autocomplete="off" placeholder="请选择发布时间"
                               value="#(test.pub_date_str)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">测试路经</label>

                    <div class="layui-input-block">
                        <input type="text" name="test_url" placeholder="请输入测试路经"
                               value="#(test.test_url)" class="layui-input ">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">图片</label>

                    <div class="layui-input-inline" style="width:200px">
                        <input type="text" lay-skin="myupload" class="layui-hide"
                               name="test_img" view_path="#(test.test_img_view)" value="#(test.test_img)"/>
                    </div>
                    <div class="layui-input-inline" style="width:200px">
                        <input type="text" lay-skin="myupload" class="layui-hide"
                               name="test_img2" view_path="#(test.test_img2_view)" value="#(test.test_img2)"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>

                    <div class="layui-input-block">
                        <textarea name="test_desc" placeholder="请输入备注" class="layui-textarea" style="height:60px">#(test.test_desc)</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    layui.use(['form', 'laydate', 'myColor', 'myIcon', 'myNumber', 'myUpload'], function () {
        layui.laydate.render({elem: '#pub_date', type: 'datetime', format: 'yyyy-MM-dd HH:mm:ss'});
        layui.myNumber.render({readonly: true, min: 1, max: 5, step: 2});
        layui.myUpload.render({btn_class: "layui-btn-sm btn-change-13", btn_txt: '上传'});
        layui.myColor.render({});
        layui.myIcon.render({});
    });

    layui.use(['form', 'myTool'], function () {
        layui.form.on('submit(Submit1)', function (data) {
            layui.myTool.postJson("ModifyTestDemoApi", data.field, function () {
                parent.layer.closeAll();
            });
            return false;
        });
    });
    //-->
</SCRIPT>
</body>
</html>